package com.grupoconstruobras.sigo.general;

import com.grupoconstruobras.sigo.datatransfer.ResultSet;
import com.grupoconstruobras.sigo.ServiceException;

import javax.ejb.Local;

@Local
public interface ICrudManager<ID, T> {

  public final static String JNDI = "!com.grupoconstruobras.sigo.exhumaciones.ICrudManager";

  public abstract T save(T dto) throws ServiceException;

  public abstract T merge(ID id, T dto) throws ServiceException;

  public abstract void remove(ID id) throws ServiceException;

  public abstract T getById(ID id) throws ServiceException;

  public abstract ResultSet<?> filter(T dto, Integer offset, Integer limit) throws ServiceException;

}
